package v1

import (
	"github.com/gogf/gf/v2/frame/g"
)

// 详情页面
type DetailReq struct {
	g.Meta `path:"/account/detail" method:"post" sm:"获取信息" tags:"帐户"`
}

type DetailRes struct {
	Username     string   `json:"username" dc:"用户名"`
	Email        string   `json:"email" dc:"邮箱"`
	Roles        []string `json:"roles" dc:"角色"`
	Introduction string   `json:"introduction" dc:"介绍"`
	Avatar       string   `json:"avatar" dc:"头像"`
	Name         string   `json:"nickname" dc:"昵称"`
}

// 刷新token
type RefreshTokenReq struct {
	g.Meta `path:"/account/refresh_token" method:"post" sm:"刷新token" tags:"帐户"`
	Token  string `json:"token" v:"required" dc:"当前token"`
}

type RefreshTokenRes struct {
	Token string `json:"token" dc:"刷新:在需要鉴权的接口中header加入Authorization: token"`
}
